package com.lzh.hash;

/**
 * @author lzh
 * @create 2022-08-07 17:07
 *
 * Student类：每一个Student都有自己的姓名和id(简单点有两个属性)
 */
public class Student {
    private int id;
    private String name;
    private Student next;// 指向下一个节点

    public Student(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Student getNext() {
        return next;
    }

    public void setNext(Student next) {
        this.next = next;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", next=" + next +
                '}';
    }
}
